home *** CD-ROM | disk | FTP | other *** search
/ The Netter Presenter: Ur…ion in Overactive Bladder / The Netter Presenter: Urinary System - Structure & Function in Overactive Bladder.iso / mac / UrinarySystem.app / Contents / Main.dxr / Internal_166_export images frame script.ls < prev    next >
Encoding:
Text File  |  2005-01-18  |  4.2 KB  |  123 lines

  1. global gCurrentScreen, gImageChannel, glCurrentListData, gListObject, gPathSymbol, filePath, gsize, gexportlistswitch, gprintlistimages, gLoadTime, gPointerChannel, gLabelChannel, gLineChannel
  2.  
  3. on enterFrame me
  4.   gCurrentScreen = the frameLabel
  5. end
  6.  
  7. on prepareFrame
  8.   if gexportlistswitch = 1 then
  9.     gexportlistswitch = 0
  10.     sprite(gImageChannel).visible = 0
  11.     updateStage()
  12.     repeat with x = 1 to glCurrentListData.count
  13.       if the platform contains "Mac" then
  14.         image = new(xtra("DirectImage"), 241040691)
  15.       else
  16.         image = new(xtra("DirectImage"), 236558701)
  17.       end if
  18.       value(gListObject).plImageData = getAt(glCurrentListData, x)
  19.       listprop = value(gListObject).plImageData.getPropAt(1)
  20.       figurename = listprop.char[6..listprop.char.count]
  21.       if figurename.char[1] = "z" then
  22.         sprite(296).visible = 1
  23.         sprite(gImageChannel).loc = point(618, 384)
  24.         sprite(gImageChannel).visible = 1
  25.         updateStage()
  26.         RestoreAnimationToExport()
  27.         baCopyFile(the moviePath & "Images" & gPathSymbol & figurename & ".mpg", filePath & "-" & x & ".mpg", "always")
  28.       else
  29.         LoadImageDefinition()
  30.         RestoreImageToExport()
  31.         sprite(gImageChannel).loc = point(512, 384)
  32.         sprite(gImageChannel).visible = 1
  33.         sprite(294).visible = 1
  34.         sprite(295).visible = 1
  35.         sprite(296).visible = 0
  36.         sprite(252).visible = 0
  37.         sprite(253).visible = 0
  38.         updateStage()
  39.         set the stageColor to the stageColor
  40.         member("Screen Capture").picture = (the stage).picture
  41.         put "imageLoadFromMember", x
  42.         imageLoadFromMember(image, member("Screen Capture", 1))
  43.         if gsize = "small" then
  44.           imageMinify(image)
  45.         end if
  46.         imageSaveToFile(image, "JPG:" & filePath & "-" & x & ".jpg", 100, 1, 1)
  47.         sprite(296).visible = 1
  48.         sprite(252).visible = 1
  49.         sprite(253).visible = 1
  50.         sprite(294).visible = 0
  51.         sprite(295).visible = 0
  52.         updateStage()
  53.       end if
  54.       forget(image)
  55.     end repeat
  56.     loadTime = the timer / 60.0
  57.     gLoadTime = ((gLoadTime * 4) + (loadTime / glCurrentListData.count)) / 5.0
  58.     go("PFlist")
  59.     updateStage()
  60.   end if
  61.   if gprintlistimages = 1 then
  62.     gprintlistimages = 0
  63.     doc = new(xtra("PrintOMatic"))
  64.     setMargins(doc, rect(36, 36, 36, 36))
  65.     setLandscapeMode(doc, 1)
  66.     newPage(doc)
  67.     firstpageswitch = 1
  68.     if 1 then
  69.       sprite(gPointerChannel).loc = point(-200, 463)
  70.       sprite(293).member = "pointer button"
  71.       sprite(294).visible = 1
  72.       sprite(295).visible = 1
  73.       sprite(296).visible = 1
  74.       sprite(252).visible = 1
  75.       sprite(253).visible = 1
  76.       updateStage()
  77.       repeat with labelNum = gLabelChannel to gLabelChannel + 99
  78.         sprite(labelNum).visible = 0
  79.       end repeat
  80.       repeat with x = 1 to glCurrentListData.count
  81.         value(gListObject).plImageData = getAt(glCurrentListData, x)
  82.         listprop = value(gListObject).plImageData.getPropAt(1)
  83.         figurename = listprop.char[6..listprop.char.count]
  84.         if figurename.char[1] = "z" then
  85.           animationalertswitch = 1
  86.           next repeat
  87.         end if
  88.         if firstpageswitch = 0 then
  89.           newPage(doc)
  90.         end if
  91.         firstpageswitch = 0
  92.         RestoreImageToExport()
  93.         sprite(294).visible = 1
  94.         sprite(295).visible = 1
  95.         updateStage()
  96.         set the stageColor to the stageColor
  97.         member("Screen Capture").picture = (the stage).picture
  98.         drawPicture(doc, member("Screen Capture"), rect(70, 0, 720, 540), 1)
  99.         sprite(294).visible = 0
  100.         sprite(295).visible = 0
  101.         sprite(296).visible = 0
  102.         sprite(252).visible = 0
  103.         sprite(253).visible = 0
  104.         updateStage()
  105.       end repeat
  106.       if doJobSetup(doc) = 1 then
  107.         if the optionDown then
  108.           printPreview(doc)
  109.         else
  110.           print(doc)
  111.         end if
  112.         if animationalertswitch = 1 then
  113.           animationalertswitch = 0
  114.           alert("The animation(s) included in the list cannot be printed.")
  115.         end if
  116.       end if
  117.       doc = 0
  118.       loadTime = the timer / 60.0
  119.       gLoadTime = ((gLoadTime * 4) + (loadTime / glCurrentListData.count)) / 5.0
  120.     end if
  121.   end if
  122. end
  123.